The present invention relates to a method of and apparatus for generating random numbers. The method is generally applicable to any xe2x80x9crandom event sourcexe2x80x9d in combination with a suitable xe2x80x9crandom event detectorxe2x80x9d. Where the event detector is set up to emit a discrete recognisable signal that can be counted each time a random event is detected. Such a device is commonly referred to as a xe2x80x9cRandom Pulse Generatorxe2x80x9d (RPG).
There are many applications for RPGs. These applications include security monitoring and control, statistical quality control and analysis, gaming machines, message and data encryption, smart cards and other applications. In all of these applications random numbers or random pulses can be used to control a process, a transaction or the transmission and receipt of data and information in such a way that corruption or duplication of the information by human intervention is impossible. Where the random event source uses radio-active material, the special nature of radioactivity makes the RPG very difficult to duplicate or imitate. In applications where the objective is to prevent fraud or corruption RPG""s of this type have several advantages over other methods.
The application of a low activity radiation source in conjunction with a PIN diode detector to produce random voltage pulses has been described elsewhere (Japanese patent application JP 6-154411). In this document the random voltage pulses are used to control the operation of a Pachinko gaming machine. In the Pachinko application the device (which is referred to as a Radioactive Random Pulse Generator or RIRPG) is not used to produce random numbers. Similarly in JP 58166448 (NEC CORP.) a system for generating random numbers is described which utilises alpha decay. The system employs a bank of bits positioned equidistant from a uranium source. Each bit is sensitive to alpha rays. When the uranium decays, alpha rays are emitted and strike one or more bits. Those bits that are struck by alpha rays are designated binary xe2x80x981xe2x80x99 and those bits are left unaffected are designated binary xe2x80x980xe2x80x99. In this way the bank of bits generates a random binary number following exposure to the uranium, the maximum length of which being determined by the number of bits in the bank. However, to ensure truly random numbers, it is essential, as acknowledged in the document, that the probability of the alpha rays emerging from the uranium in any particular direction must be equal to the probabilities for all other directions.
In an article appearing in Proceedings of the IEEE, vol. 66, no. 7 July 1978, pages 807-809 entitled xe2x80x9cGeneration of Random Bite with Accurate and Reproducible Statistical Propertiesxe2x80x9d, F Castanie the accuracy conditions for ensuring the electronic generation of truly random numbers is discussed. However, the design of the circuit for generating the random numbers is complex and does not involve any comparison with predetermined results.
There are several other methods that are well known which can be used to produce random numbers. For example such methods may use mathematical algorithms, so called xe2x80x9cwhite noisexe2x80x9d, black body radiation, brownian motion and other radioactive methods involving high activities. The most common method uses mathematical algorithms to generate random numbers using a fairly simple computer program and an 8-24 bit processor. Mathematical algorithms produce a stream of numbers that are calculated from an initial seed number using one of several possible mathematical formulas. Each number is then used to produce a seed for the next calculation. There are several types of algorithm which produce streams of numbers with differing degrees of randomness. The numbers are usually described as xe2x80x98pseudo-randomxe2x80x99 because they are based on calculation and there is always a chance that a seed number will be repeated which would result in an infinite closed loop of repeat sequences. For most applications mathematical algorithms are adequate but in some applications pure random numbers are preferred. In these circumstances naturally random and unpredictable processes such as radioactive decay may have distinct advantages.
The present invention provides a method of generating random numbers comprising: detecting random events generated by a random event source during a predetermined time period to produce a first set of detected events; detecting random events generated by the random event source during a subsequent time period to produce a second set of detected events; comparing each of the first and second sets of detected events with a predetermined result; and where only one of the first and second sets of detected events corresponds to the predetermined result, generating one of two possible number signals in dependence on which of the first and second sets of detected events corresponds to the predetermined result.
Where both of the sets of detected events correspond to the predetermined result or where neither set of detected events corresponds to the predetermined result then no number signal is generated.
The predetermined result is preferably selected to be the detection of no random events. Thus, where no random events are detected in either of the two sequential detecting time periods or at least one random event is separately detected in both of the two sequential time periods, no number signal is generated.
With the present invention a binary number is generated by checking whether any events are detected during first and second time periods and generating binary number signals where one or more events are detected during only one of the first and second time periods. Thus, matching results are discarded whereas different results are used to generate the random number. With a conventional random number generator, the comparisons used to generate the binary numbers are required to have a probability of exactly xc2xd or else the numbers produced are not truly random. With the present invention though the probability of the detected events matching or failing to match the predetermined results are permitted to be other than xc2xd. For example, where the probability of the predetermined result being detected is other than xc2xd, there will be a greater likelihood of the detected events matching the predetermined result. Thus, by discarding matching results from two separate detection time periods and generating number signals only where the results differ, a truly random number can be generated.
It will be appreciated that where the probability of the detected events corresponding to the predetermined result substantially equals the probability of the detected events not corresponding to the predetermined result, around 50% of all pairs will generate a number signal. This, though, wastes around 25% of the detected events which will occur in pairs where random events are detected in both time periods. To ensure the greatest efficiency (least number of detected events discarded) the time period during which random events are detected is made sufficiently short that the probability of detecting events in successive time periods is small. Hence, to generate the most number signals per unit time, a time period  less than  less than ln 2/(Mean pulse rate) is used.
The present invention also provides apparatus for performing the above method.
In a preferred embodiment the source of random events is an ultra low activity radiation source such as an alpha emitter and the preferred detector is a small semiconductor radiation detector such as a PIN diode. The combined source and detector in the form of an RPG, produces random voltage and/or current pulses. The RPG is robust and miniaturizable. It has the potential to be integrated onto a computer chip. Moreover, the RPG can operate with xe2x80x9cvirtually no radioactivityxe2x80x9d (VNR). For example the activity content may be in the range xcx9c0.04 Bq-37 kBq (xcx9c1 pCi-1 xcexcCi), typically the activity content is xcx9c37 Bq-4 kBq (xcx9c1-100 nCi). Alternatively, natural background radioactivity can be used.
In any event, the use of radioactivity in consumer applications is not new. Certain luminous devices such as wrist watches contain tritium and many domestic smoke detectors contain americium. Their use is commonplace and widespread throughout the world. Consumer applications such as these are permitted by certain national and international regulations which allow products to be exempted from the usual controls which restrict the use of higher activities. With the present invention, the radioactive content is typically 10-1000 times lower than the amount of radioactivity that is used in a domestic smoke detector. Therefore this device would be suitable for use in consumer applications throughout the world.
Although the preferred embodiment of the device uses radioactive decay as the source of random events, the invention is not limited to the use of radioactivity. In principle, the method can apply to any random or pseudo-random process that produces discrete, detectable events.